<?php
    $title = (!isset($title) || !empty($title)) ? 'Administration' : 'Administration :: '.$title;
    $menu = $this->load->view('admin/menu', '', true);
    $js = (isset($js) && is_array($js)) ? $js : array();
    $css = (isset($css) && is_array($css)) ? $css : array();
?>

<html>
    <head>
        <title><?php echo $title; ?></title>
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
        <?php foreach($js as $currentJs): ?>
            <script type="text/javascript" src="<?php echo $currentJs; ?>" ></script>
        <?php endforeach; ?>
        <?php foreach($css as $currentCss): ?>
            <link href="<?php echo $currentCss; ?>" rel="stylesheet" media="all" type="text/css">
        <?php endforeach; ?>
        
    </head>
    <body>
        <!-- TITLE -->
        <h1><?php echo $title; ?></h1>

        <!-- MENU -->
        <div id="container_main_menu">
            <?php echo $menu; ?>
        </div>

        <!-- FLASH MSG -->
        <?php if($this->session->flashdata('message')): ?>
        <div id="container_message">
            <em><?php echo $this->session->flashdata('message'); ?></em>
        </div>
        <?php endif; ?>

        <!-- MAIN -->
        <div id="container_main_content">
            <?php echo $main; ?>
        </div>
    </body>
</html>
